home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 3⁄2⁄90 / 0779-ating views-Feb90 < prev    next >
Encoding:
Text File  |  1990-03-02  |  2.2 KB  |  63 lines  |  [TEXT/GEOL]

  1. Item    0832295                         28-Feb-90        09:04
  2.  
  3. From:   DASNET#                         DASNET, Anna Lange,VCA
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub: Floating views
  8.  
  9. TO ANSWER, set "Send to" to:  Ravinder.Chandhok@GNOME.CS.CMU.EDU@DASNET#
  10.  
  11.  
  12. [This message was forwarded from an internet mailing list "macoops" - Rob]
  13.  
  14. ------- Forwarded Message
  15.  
  16. Date:    Tue, 27 Feb 90 10:35:54 -0500
  17. From:    Brian Patrick Arnold <ba0k+@ANDREW.CMU.EDU>
  18. To:      Macoops <macoops+@ANDREW.CMU.EDU>
  19. cc:
  20. Subject: Floating Views
  21.  
  22.  
  23. Howdy,
  24.  
  25.     if I want a view to be relocated sort of like resizing relSuperView,
  26. how do I do this correctly using SuperViewChangedSize?
  27.  
  28. In my current scheme for a vertically floating palette, I force a
  29. redraw, relocate and call INHERITED SuperViewChangedSize.  I ForceRedraw
  30. first because there seems to be a problem in completely invalidating the
  31. old extent of the view.  I then modify the location and call .Locate.
  32.  
  33. PROCEDURE TFloatingPalette.SuperViewChangedSize( delta: VPoint;
  34.                            invalidate: BOOLEAN );
  35.     OVERRIDE;
  36. BEGIN
  37.     ForceRedraw;
  38.     fLocation.v := fLocation.v + delta.v;
  39.     Locate( fLocation.h, fLocation.v, kRedraw );
  40.  
  41.     INHERITED SuperViewChangedSize( delta, invalidate );
  42. END;
  43.  
  44. It seems to work fine for a palette of buttons in the vertical
  45. direction.  The present problem is in using the same algorithm for a
  46. horizontally floating TStaticText view (modifying fLocation.h instead of
  47. fLocation.v) - it keeps clipping itself in the horizontal direction.
  48. This is most noticable when resizing the superview width smaller than
  49. the current size by about 8 pixels - the text view moves back 8 pixels
  50. horizontally but the first 8 horizontal pixels worth of text in the view
  51. aren't drawn (the rest are) unless I somehow force another redraw.  I
  52. tried adding another ForceRedraw and IF Focus THEN before and after
  53. calling Locate but that didn't solve the problem.  The views in question
  54. are sizeFixed in both directions.  I shouldn't even have to call
  55. ForceRedraw or Focus to accomplish this task, right?
  56.  
  57. Ack.  Any help much appreciated, thanks a mil.  This should be cake.
  58.  
  59. - - Brian
  60.  
  61. ------- End of Forwarded Message
  62.  
  63.